<include file="public@agent_header"/>
</head>
<body>
<div class="wrap">
    <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="">
        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required"></span>订单编号：</label>
            <label class="text-inline">
                    {$row.order_no}
            </label>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required"></span>销售组织：</label>
            <label class="text-inline">
                    {:factory_name($row.sale_number)}
            </label>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required"></span>业务员：</label>
            <label class="text-inline">
                    {$row.staff_number}{$row.staff_name}
            </label>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required"></span>下单时间：</label>
            <label class="text-inline">
                    {$row.create_time}
            </label>
        </div>
        <if !empty($row.processing)>
        <hr style="border-top: 2px solid #bbbbbb;">
        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required"></span>审批流程</label>
            <div class="col-md-6 col-sm-10">
                <table class="table table-hover table-bordered">
                    <foreach name="row.processing" item="vo">
                    <thead>
                        <tr>
                            <th>{$vo.position_name}</th>
                        </tr>
                        <tr>
                        <if $vo.act == 'up' || $vo.act == 'yes'>
                            <td>已通过。{$vo.opinion}</td>
                        </if>
                        <if $vo.act == 'no'>
                            <td>已驳回。{$vo.opinion}</td>
                        </if>
                        <if empty($vo.act)>
                            <td>待审核···</td>
                        </if>
                        </tr>
                    </thead>
                    </foreach>
                </table>
            </div>
        </div>
        </if>
        <if !empty($row.error_list)>
        <hr style="border-top: 2px solid #bbbbbb;">
        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required"></span>异常原因</label>
            <div class="col-md-6 col-sm-10">
                <table class="table table-hover table-bordered">
                    <foreach name="row.error_list" item="vo">
                    <thead>
                        <tr>
                            <th>{$vo.name}</th>
                        </tr>
                        <tr>
                            <td>{$vo.reason}</td>
                        </tr>
                    </thead>
                    </foreach>
                </table>
            </div>
        </div>
        </if>
        <hr style="border-top: 2px solid #bbbbbb;">
        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required"></span>产品</label>
            <div class="col-md-6 col-sm-10">
                <table class="table table-hover table-bordered">
                    <thead>
                        <tr>
                            <th style="width: 108px;">产品</th>
                            <th style="width: 53px;">数量</th>
                            <th style="width: 73px;">公司基价</th>
                            <th style="width: 73px;">成交基价</th>
                            <th style="width: 53px;">溢价</th>
                            <th style="width: 60px;">成交价</th>
                            <th style="width: 53px;">运费</th>
                            <th style="width: 53px;">利息</th>
                            <th style="width: 60px;">信保费</th>
                            <th style="width: 45px;">其他</th>
                            <th>总价</th>
                        </tr>
                        <foreach name="row.product" item="vo">
                            <tr>
                                <td>{$vo.wuliao}({$vo.baozhuang}KG)</td>
                                <td>{:floatval($vo.weight)}</td>
                                <td>{:floatval($vo.price)}</td>
                                <td>{:floatval($vo.yijia-$row.freight-$row.interest-$row.xbf-$row.yinsu-$row.F_LOY_jgyxys)}</td>
                                <td>{:floatval($vo.yijia-$row.freight-$row.interest-$row.xbf-$row.yinsu-$row.F_LOY_jgyxys-$vo.price)}</td>
                                <td>{:floatval($vo.yijia)}</td>
                                <td>{:floatval($row.freight)}</td>
                                <td>{:floatval($row.interest)}</td>
                                <td>{:floatval($row.xbf)}</td>
                                <td>{:floatval($row.yinsu+$row.F_LOY_jgyxys)}</td>
                                <td>{:floatval($vo.total)}</td>
                            </tr>
                        </foreach>
                    </thead>
                </table>
            </div>
        </div>
        <hr style="border-top: 2px solid #bbbbbb;">
        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required"></span>出货工厂：</label>
            <label class="text-inline">
                    {$row.factory_name}
            </label>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required"></span>配送方式：</label>
            <label class="text-inline">
                    {$row.type}
            </label>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required"></span>配送地址：</label>
            <label class="text-inline">
                    {$row.receiving_address}
            </label>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required"></span>约定发货日：</label>
            <label class="text-inline">
                    {$row.fahuo_date}
            </label>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required"></span>付款方式：</label>
            <label class="text-inline">
                    {$row.pay_type}
            </label>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required"></span>付款账期：</label>
            <label class="text-inline">
                    {$row.pay_account}
            </label>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required"></span>特别交代：</label>
            <label class="text-inline">
                    {$row.remarks}
            </label>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>